PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


GetThemeFont

Obtains information about a system font in the current theme.

pascal OSStatus GetThemeFont (
                     ThemeFontID inFontID,
                     ScriptCode inScript,
                     StringPtr outFontName,
                     SInt16 *outFontSize,
                     Style *outStyle);
inFontID
A value of type ThemeFontID . Pass a constant specifying the kind of font (that is, the current large, small, or small emphasized system fonts or the views font) for which you wish to retrieve the current font name, size, and style in use. See Theme Font ID Constants for descriptions of possible values.
inScript
A value of type ScriptCode . Pass a script code identifying the script system for which you wish obtain font information. You may pass the metascript code smSystemScript to specify the system script.
outFontName
A value of type StringPtr . Pass a pointer to a Pascal string. On return, the string contains the name of the font in use. Pass NULL if you do not wish to obtain this information.
outFontSize
A pointer to a signed 16-bit integer. On return, the integer value specifies the size of the font in use. Pass NULL if you do not wish to obtain this information.
outStyle
A pointer to a value of type Style . On return, the value specifies the style of the font in use. Pass NULL if you do not wish to obtain this information.
function result
A result code; see Result Codes .
DISCUSSION

Your application can call the GetThemeFont function to obtain the precise font settings (font name, size, and style) used by a system font under the current theme.

VERSION NOTES

Available with Appearance Manager 1.1 and later.

SEE ALSO

The function UseThemeFont .


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)